/**************************************************************************************
 *  Copyright (c)  2010  Leszek Karcz, Changmin Bae.
 *  Permission is granted to copy, distribute and/or modify this document
 *  under the terms of the GNU Free Documentation License, Version 1.3
 *  or any later version published by the Free Software Foundation;
 *  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 *  A copy of the license is included in the section entitled "GNU
 *  Free Documentation License". 
 **************************************************************************************/
package data.tileables;

/**************************************************************************************
 * Author(s): Leszek Karcz, Changmin Bae
 * Base structure for all elements that can be put inside a tile
 **************************************************************************************/
public abstract class Tileable
{
	private int x=-1,y=-1;
	private String image;
	private String type;
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * Tileable constructor
	 **************************************************************************************/
	public Tileable()
	{
		this.setImage("");
		this.setType("Tileable");
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * get x coordinate
	 **************************************************************************************/
	public int getX()
	{
		return this.x;
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * get y coordinate
	 **************************************************************************************/
	public int getY()
	{
		return this.y;
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * set [x,y] coordinates
	 **************************************************************************************/
	public void setPosition(int x, int y)
	{
		this.x=x;
		this.y=y;
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * get image file name
	 **************************************************************************************/
	public String getImage()
	{
		return this.image;
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * set image file name
	 **************************************************************************************/
	protected void setImage(String image)
	{
		this.image=image;
	}	
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * get type name
	 **************************************************************************************/
	public String getType()
	{
		return this.type;
	}
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * set type name
	 **************************************************************************************/
	protected void setType(String type)
	{
		this.type=type;
	}
}
